package com.cyt.wx.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 应用信息-应用信息实体类
 *
 * @author shengQiang Yu
 * @date 2019-8-8 8:45:11
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_wx_apply_use")
public class WxApplyUse implements Serializable {

	/**
     * 主键ID
     */ 
	@Id
	private String id;

	/**
     * 应用名称
     */ 
	@Column(name = "name")
	private String name;

	/**
     * 应用封面
     */ 
	@Column(name = "cover_image")
	private String coverImage;

	/**
     * 后台跳转地址
     */ 
	@Column(name = "web_path")
	private String webPath;

	/**
     * 手机端跳转地址
     */ 
	@Column(name = "phone_path")
	private String phonePath;

	/**
     * 费用元/年
     */ 
	@Column(name = "money")
	private Double money;

	/**
     * 试用时间/天
     */ 
	@Column(name = "use_day")
	private Integer useDay;
	/**
	 * 应用状态:1、默认类应用，2、购买类应用
	 */
	@Column(name = "apply_use_status")
	private String applyUseStatus;
	/**
     * 状态类型:1、正常,2、无效
     */ 
	@Column(name = "status")
	private String status;

	/**
	 * 类型:1=微信公众号2=微信小程序3=游戏
	 */
	@Column(name = "type")
	private String type;

	/**
     * 版本号
     */ 
	@Column(name = "version")
	private String version;

	/**
	 * 点击量
	 */
	@Column(name = "clicks")
	private Integer clicks;

	/**
     * 更新记录
     */ 
	@Column(name = "update_record")
	private String updateRecord;

	/**
     * 描述
     */ 
	@Column(name = "description")
	private String description;

	/**
     * 删除标识
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 描述
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author shengQiang Yu
	 * @date 2019-8-8 8:45:11
	 */
	public WxApplyUse(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}